/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

pipeline
API OF Pipeline Create|Update|Read|Delete|Execute

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/

#import <Foundation/Foundation.h>
#import <JDCloudOCSDKPipeline/PipelineApiModel.h>


@implementation PipelineGetOperationProvidersRequest
-(id) initWithRegion:(NSString *)regionId
type:(NSString*)type { 
    self.regionId = regionId;
    self.type = type;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
type:(NSString*)type { 
    self.regionId = regionId;
    self.version = version;
    self.type = type;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.type = [dictionary objectForKey:@"type"];
    return self;
} 

@end
@implementation PipelineGetRegionsRequest
-(id) initWithRegion:(NSString *)regionId
type:(NSString*)type { 
    self.regionId = regionId;
    self.type = type;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
type:(NSString*)type { 
    self.regionId = regionId;
    self.version = version;
    self.type = type;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.type = [dictionary objectForKey:@"type"];
    return self;
} 

@end
@implementation PipelineManualActionResult
-(id) initWithInstanceUuid:(NSString*) instanceUuid
        actionUuid:(NSString*)actionUuid { 
    self.instanceUuid = instanceUuid;               
    self.actionUuid = actionUuid;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self instanceUuid])
    {
        [result setValue:[self instanceUuid] forKey:@"instanceUuid"];
    }
    if([self actionUuid])
    {
        [result setValue:[self actionUuid] forKey:@"actionUuid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.instanceUuid = [dictionary objectForKey:@"instanceUuid"];
    self.actionUuid = [dictionary objectForKey:@"actionUuid"];
    return self;
} 

@end
@implementation PipelineManualActionRequest
-(id) initWithRegion:(NSString *)regionId
status:(NSString*)status
uuid:(NSString*)uuid
instanceUuid:(NSString*)instanceUuid
actionUuid:(NSString*)actionUuid { 
    self.regionId = regionId;
    self.status = status;
    self.uuid = uuid;
    self.instanceUuid = instanceUuid;
    self.actionUuid = actionUuid;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
status:(NSString*)status
uuid:(NSString*)uuid
instanceUuid:(NSString*)instanceUuid
actionUuid:(NSString*)actionUuid { 
    self.regionId = regionId;
    self.version = version;
    self.status = status;
    self.uuid = uuid;
    self.instanceUuid = instanceUuid;
    self.actionUuid = actionUuid;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    if([self instanceUuid])
    {
        [result setValue:[self instanceUuid] forKey:@"instanceUuid"];
    }
    if([self actionUuid])
    {
        [result setValue:[self actionUuid] forKey:@"actionUuid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.status = [dictionary objectForKey:@"status"];
    self.uuid = [dictionary objectForKey:@"uuid"];
    self.instanceUuid = [dictionary objectForKey:@"instanceUuid"];
    self.actionUuid = [dictionary objectForKey:@"actionUuid"];
    return self;
} 

@end
@implementation PipelineStopPipelineInstanceResult
-(id) initWithInstanceUuid:(NSString*) instanceUuid
        actionUuid:(NSString*)actionUuid { 
    self.instanceUuid = instanceUuid;               
    self.actionUuid = actionUuid;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self instanceUuid])
    {
        [result setValue:[self instanceUuid] forKey:@"instanceUuid"];
    }
    if([self actionUuid])
    {
        [result setValue:[self actionUuid] forKey:@"actionUuid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.instanceUuid = [dictionary objectForKey:@"instanceUuid"];
    self.actionUuid = [dictionary objectForKey:@"actionUuid"];
    return self;
} 

@end
@implementation PipelineGetPipelineInstanceRequest
-(id) initWithRegion:(NSString *)regionId
isSimple:(NSNumber*)isSimple
uuid:(NSString*)uuid
instanceUuid:(NSString*)instanceUuid { 
    self.regionId = regionId;
    self.isSimple = isSimple;
    self.uuid = uuid;
    self.instanceUuid = instanceUuid;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
isSimple:(NSNumber*)isSimple
uuid:(NSString*)uuid
instanceUuid:(NSString*)instanceUuid { 
    self.regionId = regionId;
    self.version = version;
    self.isSimple = isSimple;
    self.uuid = uuid;
    self.instanceUuid = instanceUuid;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self isSimple])
    {
        [result setValue:[self isSimple] forKey:@"isSimple"];
    }
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    if([self instanceUuid])
    {
        [result setValue:[self instanceUuid] forKey:@"instanceUuid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.isSimple = [dictionary objectForKey:@"isSimple"];
    self.uuid = [dictionary objectForKey:@"uuid"];
    self.instanceUuid = [dictionary objectForKey:@"instanceUuid"];
    return self;
} 

@end
@implementation PipelineGetPipelineInstancesRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
uuid:(NSString*)uuid { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.uuid = uuid;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
uuid:(NSString*)uuid { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.uuid = uuid;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.uuid = [dictionary objectForKey:@"uuid"];
    return self;
} 

@end
@implementation PipelineStopPipelineInstanceRequest
-(id) initWithRegion:(NSString *)regionId
uuid:(NSString*)uuid
instanceUuid:(NSString*)instanceUuid { 
    self.regionId = regionId;
    self.uuid = uuid;
    self.instanceUuid = instanceUuid;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
uuid:(NSString*)uuid
instanceUuid:(NSString*)instanceUuid { 
    self.regionId = regionId;
    self.version = version;
    self.uuid = uuid;
    self.instanceUuid = instanceUuid;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    if([self instanceUuid])
    {
        [result setValue:[self instanceUuid] forKey:@"instanceUuid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.uuid = [dictionary objectForKey:@"uuid"];
    self.instanceUuid = [dictionary objectForKey:@"instanceUuid"];
    return self;
} 

@end
@implementation PipelineReadFileResult
-(id) initWithResult:(NSNumber*) result
        contents:(NSString*)contents { 
    self.result = result;               
    self.contents = contents;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self result])
    {
        [result setValue:[self result] forKey:@"result"];
    }
    if([self contents])
    {
        [result setValue:[self contents] forKey:@"contents"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.result = [dictionary objectForKey:@"result"];
    self.contents = [dictionary objectForKey:@"contents"];
    return self;
} 

@end
@implementation PipelineGetLimitsResult
-(id) initWithNumberLimit:(NSNumber*) numberLimit
        canCreate:(NSNumber*)canCreate { 
    self.numberLimit = numberLimit;               
    self.canCreate = canCreate;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self numberLimit])
    {
        [result setValue:[self numberLimit] forKey:@"numberLimit"];
    }
    if([self canCreate])
    {
        [result setValue:[self canCreate] forKey:@"canCreate"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.numberLimit = [dictionary objectForKey:@"numberLimit"];
    self.canCreate = [dictionary objectForKey:@"canCreate"];
    return self;
} 

@end
@implementation PipelineDeletePipelineResult
-(id) initWithUuid:(NSString*) uuid
        result:(NSNumber*)result { 
    self.uuid = uuid;               
    self.result = result;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    if([self result])
    {
        [result setValue:[self result] forKey:@"result"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.uuid = [dictionary objectForKey:@"uuid"];
    self.result = [dictionary objectForKey:@"result"];
    return self;
} 

@end
@implementation PipelineStartPipelineRequest
-(id) initWithRegion:(NSString *)regionId
uuid:(NSString*)uuid { 
    self.regionId = regionId;
    self.uuid = uuid;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
uuid:(NSString*)uuid { 
    self.regionId = regionId;
    self.version = version;
    self.uuid = uuid;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.uuid = [dictionary objectForKey:@"uuid"];
    return self;
} 

@end
@implementation PipelineUpdatePipelineResult
-(id) initWithUuid:(NSString*) uuid
        result:(NSNumber*)result { 
    self.uuid = uuid;               
    self.result = result;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    if([self result])
    {
        [result setValue:[self result] forKey:@"result"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.uuid = [dictionary objectForKey:@"uuid"];
    self.result = [dictionary objectForKey:@"result"];
    return self;
} 

@end
@implementation PipelineStartPipelineResult
-(id) initWithInstanceUuid:(NSString*) instanceUuid
        uuid:(NSString*)uuid
        result:(NSNumber*)result { 
    self.instanceUuid = instanceUuid;               
    self.uuid = uuid;               
    self.result = result;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self instanceUuid])
    {
        [result setValue:[self instanceUuid] forKey:@"instanceUuid"];
    }
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    if([self result])
    {
        [result setValue:[self result] forKey:@"result"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.instanceUuid = [dictionary objectForKey:@"instanceUuid"];
    self.uuid = [dictionary objectForKey:@"uuid"];
    self.result = [dictionary objectForKey:@"result"];
    return self;
} 

@end
@implementation PipelineGetPipelineRequest
-(id) initWithRegion:(NSString *)regionId
uuid:(NSString*)uuid { 
    self.regionId = regionId;
    self.uuid = uuid;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
uuid:(NSString*)uuid { 
    self.regionId = regionId;
    self.version = version;
    self.uuid = uuid;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.uuid = [dictionary objectForKey:@"uuid"];
    return self;
} 

@end
@implementation PipelineDeletePipelineRequest
-(id) initWithRegion:(NSString *)regionId
uuid:(NSString*)uuid { 
    self.regionId = regionId;
    self.uuid = uuid;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
uuid:(NSString*)uuid { 
    self.regionId = regionId;
    self.version = version;
    self.uuid = uuid;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.uuid = [dictionary objectForKey:@"uuid"];
    return self;
} 

@end
@implementation PipelineCreatePipelineResult
-(id) initWithUuid:(NSString*) uuid
        result:(NSNumber*)result { 
    self.uuid = uuid;               
    self.result = result;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    if([self result])
    {
        [result setValue:[self result] forKey:@"result"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.uuid = [dictionary objectForKey:@"uuid"];
    self.result = [dictionary objectForKey:@"result"];
    return self;
} 

@end
@implementation PipelineGetSourceProvidersRequest
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
@implementation PipelineGetOperationProvidersResult
-(id) initWithTotalCount:(NSNumber*) totalCount
        providers:(NSArray<NameLabelPair*>*)providers { 
    self.totalCount = totalCount;               
    self.providers = providers;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    if([self providers])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self providers] count]; i++) {
            NameLabelPair* item = [[self providers] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"providers"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    NSArray* providersArray = [dictionary objectForKey:@"providers"];
    if(providersArray&&![providersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [providersArray count];i++)
        {
        NameLabelPair* item = [[NameLabelPair alloc]initWithDic:[providersArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.providers = propertyArray;
    }
    return self;
} 

@end
  
@implementation PipelineGetOperationProvidersResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
PipelineGetOperationProvidersResult* result = [[PipelineGetOperationProvidersResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(PipelineGetOperationProvidersResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation PipelineGetSourceProvidersResult
-(id) initWithTotalCount:(NSNumber*) totalCount
        providers:(NSArray<NameLabelPair*>*)providers { 
    self.totalCount = totalCount;               
    self.providers = providers;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    if([self providers])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self providers] count]; i++) {
            NameLabelPair* item = [[self providers] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"providers"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    NSArray* providersArray = [dictionary objectForKey:@"providers"];
    if(providersArray&&![providersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [providersArray count];i++)
        {
        NameLabelPair* item = [[NameLabelPair alloc]initWithDic:[providersArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.providers = propertyArray;
    }
    return self;
} 

@end
@implementation PipelineGetRegionsResult
-(id) initWithTotalCount:(NSNumber*) totalCount
        regions:(NSArray<NameLabelPair*>*)regions { 
    self.totalCount = totalCount;               
    self.regions = regions;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    if([self regions])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self regions] count]; i++) {
            NameLabelPair* item = [[self regions] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"regions"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    NSArray* regionsArray = [dictionary objectForKey:@"regions"];
    if(regionsArray&&![regionsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [regionsArray count];i++)
        {
        NameLabelPair* item = [[NameLabelPair alloc]initWithDic:[regionsArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.regions = propertyArray;
    }
    return self;
} 

@end
  
@implementation PipelineGetRegionsResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
PipelineGetRegionsResult* result = [[PipelineGetRegionsResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(PipelineGetRegionsResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation PipelineGetSourceProvidersResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
PipelineGetSourceProvidersResult* result = [[PipelineGetSourceProvidersResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(PipelineGetSourceProvidersResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation PipelineManualActionResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
PipelineManualActionResult* result = [[PipelineManualActionResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(PipelineManualActionResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation PipelineGetPipelineInstanceResult
-(id) initWithPipelineInstance:(PipelineInstance*) pipelineInstance { 
    self.pipelineInstance = pipelineInstance;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self pipelineInstance])
    {
        [result setValue:[[self pipelineInstance] dictionary]forKey:@"pipelineInstance"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pipelineInstance = [[PipelineInstance alloc]initWithDic:[dictionary objectForKey:@"pipelineInstance"]];
    return self;
} 

@end
  
@implementation PipelineGetPipelineInstanceResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
PipelineGetPipelineInstanceResult* result = [[PipelineGetPipelineInstanceResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(PipelineGetPipelineInstanceResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation PipelineGetPipelineInstancesByUuidsResult
-(id) initWithPipelineInstances:(NSArray<PipelineInstance*>*) pipelineInstances { 
    self.pipelineInstances = pipelineInstances;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self pipelineInstances])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self pipelineInstances] count]; i++) {
            PipelineInstance* item = [[self pipelineInstances] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"pipelineInstances"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* pipelineInstancesArray = [dictionary objectForKey:@"pipelineInstances"];
    if(pipelineInstancesArray&&![pipelineInstancesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [pipelineInstancesArray count];i++)
        {
        PipelineInstance* item = [[PipelineInstance alloc]initWithDic:[pipelineInstancesArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.pipelineInstances = propertyArray;
    }
    return self;
} 

@end
  
@implementation PipelineGetPipelineInstancesByUuidsResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
PipelineGetPipelineInstancesByUuidsResult* result = [[PipelineGetPipelineInstancesByUuidsResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(PipelineGetPipelineInstancesByUuidsResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation PipelineGetPipelineInstancesResult
-(id) initWithTotalCount:(NSNumber*) totalCount
        instances:(NSArray<PipelineInstance*>*)instances { 
    self.totalCount = totalCount;               
    self.instances = instances;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    if([self instances])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self instances] count]; i++) {
            PipelineInstance* item = [[self instances] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"instances"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    NSArray* instancesArray = [dictionary objectForKey:@"instances"];
    if(instancesArray&&![instancesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [instancesArray count];i++)
        {
        PipelineInstance* item = [[PipelineInstance alloc]initWithDic:[instancesArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.instances = propertyArray;
    }
    return self;
} 

@end
  
@implementation PipelineGetPipelineInstancesResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
PipelineGetPipelineInstancesResult* result = [[PipelineGetPipelineInstancesResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(PipelineGetPipelineInstancesResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation PipelineStopPipelineInstanceResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
PipelineStopPipelineInstanceResult* result = [[PipelineStopPipelineInstanceResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(PipelineStopPipelineInstanceResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation PipelineGetPipelineInstancesByUuidsRequest
-(id) initWithRegion:(NSString *)regionId
uuids:(NSString*)uuids
isSimple:(NSNumber*)isSimple
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
sorts:(NSArray<Sort*>*)sorts
filters:(NSArray<Filter*>*)filters { 
    self.regionId = regionId;
    self.uuids = uuids;
    self.isSimple = isSimple;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.sorts = sorts;
    self.filters = filters;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
uuids:(NSString*)uuids
isSimple:(NSNumber*)isSimple
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
sorts:(NSArray<Sort*>*)sorts
filters:(NSArray<Filter*>*)filters { 
    self.regionId = regionId;
    self.version = version;
    self.uuids = uuids;
    self.isSimple = isSimple;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.sorts = sorts;
    self.filters = filters;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self uuids])
    {
        [result setValue:[self uuids] forKey:@"uuids"];
    }
    if([self isSimple])
    {
        [result setValue:[self isSimple] forKey:@"isSimple"];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self sorts])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self sorts] count]; i++) {
            Sort* item = [[self sorts] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"sorts"];
    }
    if([self filters])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self filters] count]; i++) {
            Filter* item = [[self filters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"filters"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.uuids = [dictionary objectForKey:@"uuids"];
    self.isSimple = [dictionary objectForKey:@"isSimple"];
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    NSArray* sortsArray = [dictionary objectForKey:@"sorts"];
    if(sortsArray&&![sortsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [sortsArray count];i++)
        {
        Sort* item = [[Sort alloc]initWithDic:[sortsArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.sorts = propertyArray;
    }
    NSArray* filtersArray = [dictionary objectForKey:@"filters"];
    if(filtersArray&&![filtersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [filtersArray count];i++)
        {
        Filter* item = [[Filter alloc]initWithDic:[filtersArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.filters = propertyArray;
    }
    return self;
} 

@end
  
@implementation PipelineReadFileResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
PipelineReadFileResult* result = [[PipelineReadFileResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(PipelineReadFileResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation PipelineReadFileRequest
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation PipelineGetLimitsResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
PipelineGetLimitsResult* result = [[PipelineGetLimitsResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(PipelineGetLimitsResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation PipelineGetLimitsRequest
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation PipelineStartPipelineResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
PipelineStartPipelineResult* result = [[PipelineStartPipelineResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(PipelineStartPipelineResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation PipelineGetPipelineResult
-(id) initWithPipeline:(Pipeline*) pipeline { 
    self.pipeline = pipeline;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self pipeline])
    {
        [result setValue:[[self pipeline] dictionary]forKey:@"pipeline"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pipeline = [[Pipeline alloc]initWithDic:[dictionary objectForKey:@"pipeline"]];
    return self;
} 

@end
  
@implementation PipelineUpdatePipelineResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
PipelineUpdatePipelineResult* result = [[PipelineUpdatePipelineResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(PipelineUpdatePipelineResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation PipelineGetPipelinesResult
-(id) initWithTotalCount:(NSNumber*) totalCount
        pipelines:(NSArray<SimplePipeline*>*)pipelines { 
    self.totalCount = totalCount;               
    self.pipelines = pipelines;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    if([self pipelines])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self pipelines] count]; i++) {
            SimplePipeline* item = [[self pipelines] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"pipelines"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    NSArray* pipelinesArray = [dictionary objectForKey:@"pipelines"];
    if(pipelinesArray&&![pipelinesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [pipelinesArray count];i++)
        {
        SimplePipeline* item = [[SimplePipeline alloc]initWithDic:[pipelinesArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.pipelines = propertyArray;
    }
    return self;
} 

@end
  
@implementation PipelineGetPipelinesResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
PipelineGetPipelinesResult* result = [[PipelineGetPipelinesResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(PipelineGetPipelinesResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation PipelineDeletePipelineResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
PipelineDeletePipelineResult* result = [[PipelineDeletePipelineResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(PipelineDeletePipelineResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation PipelineCreatePipelineRequest
-(id) initWithRegion:(NSString *)regionId
data:(PipelineParams*)data { 
    self.regionId = regionId;
    self.data = data;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
data:(PipelineParams*)data { 
    self.regionId = regionId;
    self.version = version;
    self.data = data;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self data])
    {
        [result setValue:[[self data] dictionary]forKey:@"data"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.data = [[PipelineParams alloc]initWithDic:[dictionary objectForKey:@"data"]];
    return self;
} 

@end
  
@implementation PipelineCreatePipelineResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
PipelineCreatePipelineResult* result = [[PipelineCreatePipelineResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(PipelineCreatePipelineResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation PipelineGetPipelineResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
PipelineGetPipelineResult* result = [[PipelineGetPipelineResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(PipelineGetPipelineResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation PipelineUpdatePipelineRequest
-(id) initWithRegion:(NSString *)regionId
data:(PipelineParams*)data
uuid:(NSString*)uuid { 
    self.regionId = regionId;
    self.data = data;
    self.uuid = uuid;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
data:(PipelineParams*)data
uuid:(NSString*)uuid { 
    self.regionId = regionId;
    self.version = version;
    self.data = data;
    self.uuid = uuid;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self data])
    {
        [result setValue:[[self data] dictionary]forKey:@"data"];
    }
    if([self uuid])
    {
        [result setValue:[self uuid] forKey:@"uuid"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.data = [[PipelineParams alloc]initWithDic:[dictionary objectForKey:@"data"]];
    self.uuid = [dictionary objectForKey:@"uuid"];
    return self;
} 

@end
@implementation PipelineGetPipelinesRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
sorts:(NSArray<Sort*>*)sorts
filters:(NSArray<Filter*>*)filters { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.sorts = sorts;
    self.filters = filters;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
sorts:(NSArray<Sort*>*)sorts
filters:(NSArray<Filter*>*)filters { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.sorts = sorts;
    self.filters = filters;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self sorts])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self sorts] count]; i++) {
            Sort* item = [[self sorts] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"sorts"];
    }
    if([self filters])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self filters] count]; i++) {
            Filter* item = [[self filters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"filters"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    NSArray* sortsArray = [dictionary objectForKey:@"sorts"];
    if(sortsArray&&![sortsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [sortsArray count];i++)
        {
        Sort* item = [[Sort alloc]initWithDic:[sortsArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.sorts = propertyArray;
    }
    NSArray* filtersArray = [dictionary objectForKey:@"filters"];
    if(filtersArray&&![filtersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [filtersArray count];i++)
        {
        Filter* item = [[Filter alloc]initWithDic:[filtersArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.filters = propertyArray;
    }
    return self;
} 

@end
 
